#!/bin/bash

CATALINA_BASE=/var/lib/tomcat6
IP_ADDR=`ifconfig eth0 | grep "inet addr:" | sed -r 's/^ *inet addr:([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/\1/'`
sed -i "s/hostname\\.public=.*/hostname.public=$IP_ADDR/" $CATALINA_BASE/shared/classes/alfresco-global.properties
